<template>
  <div class="coms" :id="name">
    
  </div>
</template>
<script>
import echarts from "echarts";
export default {
    name:'echarts',
    props:{
   name:String,
   data:Object
    },
  data() {
    return {
    
    }
  },
  mounted() {
    this.drawLine7()
  },
  methods: {
      drawLine7() {
      // 基于准备好的dom，初始化echarts实例
      let myChart = echarts.init(document.getElementById(this.name));
      // 绘制图表
      myChart.setOption(this.data);
    },

  },
}
</script>
<style lang="scss" >
  .coms{
    width: 100%;
    height: 100%;
  }
</style>